<template>
  <div class="d2">
    zi2: <button @click="pushz()">点我传值给zi</button>
    <button @click="pro()">点击触发异步</button>
    <slot name="xiao"></slot>
  </div>
</template>

<script>
import Eventbus from "@/eventbus.js";
export default {
  methods: {
    pro() {
      this.$store.dispatch("getaxio", { url: "/data/json" });
    },
    pushz() {
      Eventbus.$emit("zi", "我是ZI2的数据");
    },
  },
};
</script>

<style scoped>
.d2 {
  font-size: 0.16rem;
}
</style>